<template>
  <div class="recommends">
    <div class="recommends-item" v-for="(item, index) in recommends" :key="index">
      <a :href="item.link">
        <img :src="item.image" :alt="item.title">
        <p>{{item.title}}</p>
      </a>
    </div>
  </div>
</template>

<script>
export default {
  name: "Recommends",
  props: {
    recommends: {
      type: Array,
      default() {
        return []
      }
    }
  }
}
</script>

<style scoped>
  .recommends {
    display: flex;
    padding: 14px 0;
  }
  .recommends-item {
    flex: 1;
    text-align: center;
  }
  .recommends-item a {
    display: block;
    width: 100%;
    height: 100%;
  }
  .recommends-item img {
    width: 75px;
    height: 75px;
    margin-bottom: 10px;
  }
  .recommends-item p {
    font-size: 16px;
  }
</style>